let {orderBy} =require("lodash-unified")



let aa = ['v.1','n.3','adj.4','ssssd','gggggo'];
let result = aa.flatMap(form=>{
    let formPart = form.substring(0, form.lastIndexOf('.'));
    let countPart = form.substring(form.lastIndexOf('.') + 1, form.length);
    let count = parseInt(countPart);
    if(!isNaN(count)){
        return {form,formPart,arr:[]}
    }else{
        return undefined;
    }
});

console.log("")
// let aa;
// console.log(aa?.length===0);
//
// let theMap = new Map([['v',['v.1','v.3']],['n',['n.2','v.7']]]);
// orderBy(theMap,[0],["asc"]);
//
// isPickDoneFormsCountCheckedListMapEmpty(theMap);
// [...theMap.entries()].flatMap(entry=>{
//     console.log(entry);
// })
// // [...theMap.entries()].every(entry=>)
//
//
// function isPickDoneFormsCountCheckedListMapEmpty(theMap){
//     return theMap.size===0||[...theMap.entries()].every(entry=>entry&&entry.length===2&&entry[1]&&entry[1]?.length===0)
// }